import request from '#/utils/requestAbort';

// 省份-交易中心-场站（数据权限）
export async function queryMarketList(menuCode) {
  return request(`/power/dataPower/common/${menuCode}/t_station`, {
    method: 'GET',
  });
}

// 时间段设置的查询
export async function timeRangeList(data = {}) {
  return request('/predictive/dayaheadClearingPriceConfig/list', {
    method: 'POST',
    data,
  });
}

// 时间段设置的保存
export async function timeRangeInsert(data = {}) {
  return request('/predictive/dayaheadClearingPriceConfig/insert', {
    method: 'POST',
    data,
  });
}

// 筛选和聚合的接口
export async function priceForecastlist(data = {}) {
  return request('/predictive/dayaheadClearingPriceConfig/priceForecastlist', {
    method: 'POST',
    data,
  });
}

// 获取筛选的数据
export async function getSelect() {
  return request('/predictive/dayaheadClearingPriceConfig/getSelect', {
    method: 'GET',
  });
}

// 计算
export async function calculate(data = {}) {
  return request('/fanrun/dayaheadClearingPriceConfig/calculate', {
    method: 'POST',
    data,
  });
}

// 获取偏差量
export async function getDeviationAmount(data = {}) {
  return request('/fanrun/dayaheadClearingPriceConfig/getDeviationAmount', {
    method: 'POST',
    data,
  });
}
